#ifndef __INCLUDE_MPU6050_H
#define __INCLUDE_MPU6050_H
//设备地址：https://doc.embedfire.com/module/module_tutorial/zh/latest/Module_Manual/iic_class/mpu6050.html
//参考地址：https://blog.csdn.net/qq_43006346/article/details/102052673、
//https://www.cnblogs.com/zhb123456/p/10627907.html

//I2C address of the MPU-6050
#define MPU6050_Address 0x68

#define MPU6050_WHO_AM_I 0x75
#define MPU6050_DLPF_CFG 0
#define MPU6050_GYRO_OUT 0x43 //MPU6050陀螺仪数据寄存器地址
#define MPU6050_ACC_OUT 0x3B  //MPU6050加速度数据寄存器地址

//写地址：11010000，读地址：11010001
// #define MPU6050_Device_Address 0x68 /*Device Address/Identifier for MPU6050*/
#define MPU6050_Device_Address 0xD0 /*Device Address/Identifier for MPU6050*/

#define MPU6050_PWR_MGMT_1 0x6B
#define MPU6050_SMPLRT_DIV 0x19
#define MPU6050_CONFIG 0x1A
#define MPU6050_GYRO_CONFIG 0x1B
#define MPU6050_ACCEL_CONFIG 0x1C
#define MPU6050_INT_ENABLE 0x38

#define MPU6050_ACCEL_XOUT_H 0x3B
#define MPU6050_ACCEL_YOUT_H 0x3D
#define MPU6050_ACCEL_ZOUT_H 0x3F
#define MPU6050_GYRO_XOUT_H 0x43
#define MPU6050_GYRO_YOUT_H 0x45
#define MPU6050_GYRO_ZOUT_H 0x47

void MPU6050_Init();
int *MPU6050_GYRO();

#endif